#include<iostream>
using namespace std;
class A
{
public:
	virtual void fun(int a = 0)
	{
		cout << "A:" << a << endl;
	}
};
class B :public A
{
public:
	void fun(int b = 1)
	{
		cout << "B:" << b << endl;
	}
};
int main()
{
	A* p = new B;
	p->fun();
	B* pb = new B;
	pb->fun();

	return 0;
}